import {createStore, combineReducers, applyMiddleware} from "redux";
import thunkMiddleware from "redux-thunk";
import {sideBarReducer} from "./reducers/SideBarReducer";
import {layoutRenderReducer, pageRenderReducer} from './reducers/RenderReducer';
import {richTextEditorReducer} from './reducers/RichTextEditorReducer';

const reducer = combineReducers({
    sideBarReducer,
    layoutRenderReducer,
    pageRenderReducer,
    richTextEditorReducer
});

export default (initialState) =>
    createStore(reducer, initialState, applyMiddleware(thunkMiddleware));
